package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.annotation.FieldDescription;
import com.ruoyi.system.annotation.NeedOperate;
import com.ruoyi.system.annotation.ViewEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author LiSiPing
 * @since 2025-02-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Member implements Serializable {

    private static final long serialVersionUID = 1L;

    @FieldDescription(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @FieldDescription(value = "会员名称")
    @ViewEntity
    @NeedOperate
    private String memberName;

    @FieldDescription(value = "每次添加可以获得的积分")
    @ViewEntity
    @NeedOperate
    private Double addFunds;

    @FieldDescription(value = "邀请的好友添加好友后可获取的积分")
    @ViewEntity
    @NeedOperate
    private Double friendAddFunds;

    //会员价格
    private BigDecimal price;

    //会员有效天数
    private Integer day;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDescription(value = "创建时间")
    private Date createTime;

    @FieldDescription(value = "创建人")
    private String createBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @FieldDescription(value = "修改时间")
    private Date updateTime;

    @FieldDescription(value = "修改人")
    private String updateBy;

    @FieldDescription(value = "逻辑删除")
    private Boolean deleteFlag;

    //页码
    @TableField(exist = false)
    public Long current;

    //行数
    @TableField(exist = false)
    private Long size;
}
